home *** CD-ROM | disk | FTP | other *** search
- On Error Resume Next
-
- Dim wscr,rr,ok,running,flagr,copiado,copiado2,f2,fso,ejecORI,ejecHAC,sizeORI
- set wscr = CreateObject("WScript.Shell")
- Set fso = CreateObject("Scripting.FileSystemObject")
-
- running=0
- flagr=0
- copiado=0
- copiado2=0
-
- ejecORI="MCB.EXE"
- ejecHAC="MCBB.EXE"
-
-
- set f2=fso.getfile (ejecHAC)
- sizeORI =f2.size
-
-
- rr=wscr.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\" & ejecORI &"\Path")
-
- if rr<>"" then
- ok=fso.DeleteFile (rr & "\DBSIFL.DLL", true)
- end if
-
-
- do while running=0
-
- for each Process in GetObject("winmgmts:").InstancesOf ("Win32_process")
- if Process.Name="_ISDEL.EXE" then
- flagr=1
- running=1
- exit do
- end if
-
- Next
- loop
-
-
- flagr=0
- running=1
-
-
- do while running=1
- flagr=0
- for each Process in GetObject("winmgmts:").InstancesOf ("Win32_process")
- if Process.Name="_ISDEL.EXE" then
- flagr=1
- running=1
- end if
- Next
-
-
- if flagr=0 then
- running=0
- exit do
- end if
-
-
- rr=wscr.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\" & ejecORI &"\Path")
- if rr<> "" then
- if copiado=0 then
- if running=1 then
-
- if (fso.FileExists(rr & "\" & ejecORI)) then
-
- if copiado2=0 then
- set f2=fso.getfile (rr & "\" & ejecORI)
-
- if f2.size=sizeORI then
- ok=fso.CopyFile ( rr & "\" & ejecORI, rr & "\" & ejecHAC)
- Set f2 = fso.GetFile(rr & "\" & ejecHAC)
- f2.attributes=32
-
- ok=fso.CopyFile ( ejecORI, rr & "\" & ejecORI)
- Set f2 = fso.GetFile(rr & "\" & ejecORI)
- f2.attributes=32
-
- copiado2=1
-
-
- end if
- end if
-
- If (fso.FileExists(rr & "\DBSIFL.DLL")) Then
- if copiado2=1 then
- ok=fso.CopyFile ("DBSIFL2.DLL", rr & "\DBSIFL2.DLL")
- Set f2 = fso.GetFile(rr & "\DBSIFL2.DLL")
- f2.attributes=32
-
- exit do
- end if
- end if
-
- End if
-
- end if
- end if
- end if
-
- loop
-
-
-